home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / Snippets / QuickDraw / GDevVideo / Gen.cp < prev    next >
Encoding:
Text File  |  1992-07-15  |  897 b   |  36 lines  |  [TEXT/MPS ]

  1. #include    <ToolUtils.h>
  2. #include    <Quickdraw.h>
  3. #include    <StdIO.h>
  4.  
  5. main()
  6. {
  7.     GDHandle        theGDList;
  8.     Ptr                theBase;
  9.     int                theRow;
  10.     int                theDepth;
  11.     
  12.     theGDList = GetDeviceList();
  13.     
  14.     do {
  15.         theBase = (*(*theGDList)->gdPMap)->baseAddr;
  16.         printf ("The GDevice I am looking at has a Base Address of %X\n", theBase);
  17.         } while ((theGDList = GetNextDevice(theGDList)) != nil);
  18.  
  19.     theGDList = GetDeviceList();
  20.  
  21.     do {
  22.         theRow = (*(*theGDList)->gdPMap)->rowBytes;
  23.         theRow = theRow & 0x0000FFFF;
  24.         printf ("The GDevice I am looking at has a Row Bytes of %X\n", theRow);
  25.         } while ((theGDList = GetNextDevice(theGDList)) != nil);
  26.         
  27.     theGDList = GetDeviceList();
  28.  
  29.     do {
  30.         theDepth = (*(*theGDList)->gdPMap)->pixelSize;
  31.         theDepth = theDepth & 0x0000FFFF;
  32.         printf ("The GDevice I am looking at has a Row Bytes of %i\n", theDepth);
  33.         } while ((theGDList = GetNextDevice(theGDList)) != nil);
  34.         
  35.     return(0);
  36. }